import {Util} from '@lowcode/jpaas-base-lib';
import InsNewsDetail from "@/views/modules/portal/InsNews/InsNewsDetail.vue";

/**
 * 新闻扩展。
 */
export default {
    data(){
        return {
            newType: '',
        }
    },
    methods:{
        init_NewsBel(){
            this.getNewType();
            //调用父类的加载数据的方法。
            this.loadData();
        },
        //阅读新闻公告
        getInsNews(pkId) {
            let conf = {
                component: InsNewsDetail,
                curVm: this,
                data: { pkId: pkId},
                widthHeight: ['1000px', '700px']
            }
            Util.open(conf);
        },
        //获取新闻类型
        getNewType() {
            var setting = JSON.parse(this.insColumnDef.setTing);
            if (setting && setting.newType) {
                this.newType = setting.newType;
            }
        },

    }
}
